package com.caocaog.market.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.caocaog.market.modules.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 商品订单支付信息表
 *
 * @author jeecg-boot
 * @date 2021-11-29
 */
@Data
@TableName("mk_order_pay")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="mk_order_pay对象", description="商品订单支付信息表")
public class OrderPay extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;

	/**订单主键*/
	@Excel(name = "订单主键", width = 15)
    @ApiModelProperty(value = "订单主键")
    private String orderId;
	/**支付状态*/
	@Excel(name = "支付状态", width = 15, dicCode = "order_pay_status")
	@Dict(dicCode = "order_pay_status")
    @ApiModelProperty(value = "支付状态0-待支付 1-支付成功 2-支付失败 ")
    private Integer payStatus;
	/**支付方式*/
	@Excel(name = "支付方式", width = 15, dicCode = "order_pay_way")
	@Dict(dicCode = "order_pay_way")
    @ApiModelProperty(value = "支付方式 1-微信小程序 2-app微信支付 3-支付宝支付 4-字节小程序微信支付 5-字节小程序支付宝支付")
    private Integer payWay;
	/**支付流水号*/
	@Excel(name = "支付流水号outTradeNo", width = 15)
    @ApiModelProperty(value = "支付流水号-对应outTradeNo")
    private String paySerno;
	/**支付时间*/
	@Excel(name = "支付时间", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "支付时间")
    private Date payTime;
	/**订单金额*/
	@Excel(name = "订单金额", width = 15)
    @ApiModelProperty(value = "订单金额")
    private String amount;
	/**优惠金额*/
	@Excel(name = "优惠金额", width = 15)
    @ApiModelProperty(value = "优惠金额")
    private String discountAmount;
	/**配送费*/
	@Excel(name = "配送费", width = 15)
    @ApiModelProperty(value = "配送费")
    private String deliveryAmount;
	/**打包费*/
	@Excel(name = "打包费", width = 15)
    @ApiModelProperty(value = "打包费")
    private String packAmount;
	/**支付金额*/
	@Excel(name = "支付金额", width = 15)
    @ApiModelProperty(value = "支付金额")
    private String payAmount;
	/**支付结果*/
	@Excel(name = "支付结果", width = 15)
	@ApiModelProperty(value = "支付结果")
	private String endPayInfo;

	@Excel(name = "时间段加价", width = 15)
	@ApiModelProperty(value = "时间段加价,具体的钱数")
	private BigDecimal timePrice;

	@Excel(name = "特殊天气加价", width = 15)
	@ApiModelProperty(value = "特殊天气加价,具体的钱数")
	private BigDecimal weatherPrice;

	/**
	 * 总销售金额
	 */
	@TableField(exist = false)
	@ApiModelProperty(value = "首页统计用 总销售金额")
	private Double sumAll;
	/** 创建时间 */
//	@JsonFormat(timezone = "GMT+8", pattern = "MM-dd")
//	@DateTimeFormat(pattern = "MM-dd")
	@TableField(exist = false)
	private String createTimeFormat;

}
